#include "autoload.h"

using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    map<QString, CommandInterface*> commands;
    commands["help"] = new HelpCommand();
    commands["start"] = new StartCommand();
    commands["stop"] = new StopCommand();
    commands["restart"] = new RestartCommand();
    commands["exit"] = new ExitCommand();

    // no commands are supported atm
    commands["start"]->run();

    /*
    QString command = "start";
    if (argc > 1) {
        command = argv[1];
    }
    if (true) {
        if (commands.find(command) == commands.end()) {
            EventsManager::show("Command does not exist, use 'help' for information");
        } else {
            commands.find(command)->second->run();
        }
        // lets abstract away from console input as the only way for geting or showing data
        command = EventsManager::get();
    }
    */

    return a.exec();
}
